import util from '../services/util'

export default {
  createStorage: (value) => {
    util.setItem('yptFxConfig', value)
  },
  getStorage: () => {
    return util.getItem('yptFxConfig')
  },
  removeStorage: () => {
    util.removeItem('yptFxConfig')
  },
  get: (key) => {
    return util.getItem('yptFxConfig')[key]
  },
  add: (key, value) => {
    const userStorage = util.getItem('yptFxConfig')
    userStorage[key] = value
    util.setItem('yptFxConfig', userStorage)
  },
  del: (key) => {
    const userStorage = util.getItem('yptFxConfig')
    delete userStorage[key]
    util.setItem('yptFxConfig', userStorage)
  }
}
